package com.android.util;

/**
 * created by TenFace at 2017/5/24
 */
public class EncryptPhoneUtil {
    private static String phone;
    private static String afterPhone;

    public static String EncryptPhoneUtil(String beforePhone) {
        try {
            phone = beforePhone;
            if (phone.length() > 10) {
                afterPhone = phone.substring(0, 2) + "****" + phone.substring(phone.length() - 2, phone.length());
            }
            return afterPhone;
        } catch (Exception e) {
            e.printStackTrace();
            return "--";
        }
    }

}
